feat(Interaction): full interaction framework with concurrent semantics, open composition, and protocol frontends#433
feat(Interaction): full interaction framework with concurrent semantics, open composition, and protocol frontends#433
Conversation
Advance the CompPoly dependency from v4.28.0 (d7b9f98, 58 commits behind) to the latest upstream master tip. The bump is fully backward-compatible with no ArkLib code changes needed. Made-with: Cursor
Replace ~30 duplicated bivariate polynomial declarations (coeff, degrees, weighted degrees, eval, shift, root multiplicity, discriminant) with imports from CompPoly's ToMathlib bridge files. Fix downstream consumers for monomial name disambiguation and the now-unconditional weightedDegree_eq_natWeightedDegree. Net: 597 lines deleted, 47 lines changed across 4 files, zero new sorries. Made-with: Cursor
Bump VCVio from d37e586 to ebea2fa (12 commits). Remove the unused Q_ne_0 field from GuruswamiSudan.Conditions since dvd_property does not require it. Made-with: Cursor
…sors
- Restore `Q_ne_0` field in `GuruswamiSudan.Conditions`: non-zeroness
is integral to the decoder specification (Q=0 trivially satisfies the
algebraic conditions). `dvd_property` still doesn't require it.
- Fix `Conditions` docstring to accurately describe the structure.
- Fix `ne_zero_iff_coeffs_ne_zero` docstring ("all its coefficients" →
"its coefficient function").
- Add `[NoZeroDivisors F]` to `totalDegree_mul` statement — the theorem
is false over semirings with zero divisors.
Made-with: Cursor
Resolve isolated dot, long line, and unnecessary simpa warnings. Made-with: Cursor
New standalone interaction infrastructure built on W-type specs with role decorations, eliminating the old TwoParty/Multiparty inductives and ProtocolSpec/Direction wrappers. - Basic.lean: universe-polymorphic Spec, Transcript, Strategy, Decoration with map, BundledMonad, MonadDecoration, append/comp combinators - TwoParty.lean: Role, RoleDecoration (= Decoration on Spec), Strategy.withRoles, Counterpart, runWithRoles, per-node monad variants - Multiparty.lean: PartyDecoration + toRoles via Decoration.map, three-party knowledge-soundness examples with rfl proofs - Reduction.lean: Prover, Verifier, Reduction, execute parameterized by (pSpec : Spec) (roles : RoleDecoration pSpec) - PORTING.md: tracks core rebuild progress and next steps - Delete old ArkLib/Refactor/ folder (superseded) Made-with: Cursor
- Verifier: add StmtOut, rename decide→verify, m Bool→OptionT m StmtOut - OracleCounterpart: round-by-round challenger with accSpec growing at sender nodes - InteractiveOracleVerifier: unified challenger+verify (= OracleCounterpart at internal nodes, verify fn at .done) - OracleVerifier: batch structure with iov + transcript-dependent simulate + reify - OracleProver, OracleReduction: oracle-aware prover/reduction structures - Decoration.Refine: displayed decoration combinator (cf. displayed algebras, ornaments) - SenderDecoration: Refine specialized to RoleDecoration with role-dependent fiber - Universe polymorphism throughout TwoParty.lean - N-ary composition: replicate, chain, iterate for Spec/Decoration/Strategy/Transcript Made-with: Cursor
…tions Replace SenderDecoration (Decoration.Refine + PUnit junk at receiver nodes) with Role.Refine — a direct recursion on spec + roles that skips receiver nodes cleanly. Prove equivalence with Decoration.Refine for compatibility. Made-with: Cursor
- Add ArkLib/Interaction/Basic/{Spec,Decoration,Strategy,Append,Replicate,Chain,MonadDecoration,BundledMonad}
- Add ArkLib/Interaction/TwoParty/{Role,Decoration,Strategy,Swap,Compose,Refine,Examples}
- Remove monolithic Basic.lean and TwoParty.lean; update Multiparty, Reduction, Oracle imports
- Note Interaction/Basic/ in PORTING.md; add Interaction line to docs/wiki/repo-map.md
Made-with: Cursor
- Define Spec.Decoration.swap so roles.swap elaborates on Decoration (fun _ => Role) - Abbrev RoleDecoration.swap to Spec.Decoration.swap; use roles.swap in Swap/Compose theorems Made-with: Cursor
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
🤖 Gemini PR SummaryReplaces the legacy flat protocol model with a dependent-type-native Interaction framework based on W-type interaction trees ( Core Mathematical Formalization
Proof Systems & Security
Infrastructure & Documentation
Critical Technical Details:
|
| Metric | Count |
|---|---|
| 📝 Files Changed | 78 |
| ✅ Lines Added | 25654 |
| ❌ Lines Removed | 203 |
Lean Declarations
✏️ **Removed:** 1 declaration(s)
def renameMessage (pSpec : ProtocolSpec n) (NewMessage : pSpec.MessageIdx → Type) :inArkLib/OracleReduction/BCS/Basic.lean
✏️ **Added:** 470 declaration(s)
abbrev Verifier (m : Type u → Type u)inArkLib/Interaction/Reduction.leantheorem Reduction.execute_compinArkLib/Interaction/Reduction.leandef advanceinArkLib/ProofSystem/Sumcheck/Interaction/Defs.leandef Counterpart.ofChain {m : Type u → Type u} [Monad m]inArkLib/Interaction/Reduction.leandef chainCompinArkLib/Interaction/Oracle/Continuation.leandef Reduction.completenessinArkLib/Interaction/Security.leantheorem knowledgeSoundness_implies_soundnessinArkLib/Interaction/Security.leantheorem soundness_of_rbrSoundnessinArkLib/Interaction/Security.leandef Reduction.freezeSharedToPUnitinArkLib/Interaction/Oracle/Composition.leanabbrev fullRoles (n : Nat) : RoleDecoration (fullSpec R deg n)inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leandef wrapWithCommitmentsExt :inArkLib/Interaction/BCS/HybridSpec.leantheorem appendRight_range :inArkLib/Interaction/Oracle/Core.leandef stepResidual (chal : R)inArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef roundProverStepStateful (m : Type → Type) [Monad m]inArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef extractBack {spec : Spec} {roles : RoleDecoration spec} {Claim : Type u}inArkLib/Interaction/Security.leanabbrev InputLanguageinArkLib/Interaction/OracleSecurity.leanabbrev OracleProver {ι : Type} (oSpec : OracleSpec.{0, 0} ι)inArkLib/Interaction/Oracle/Core.leandef follow {spec : Spec} {roles : RoleDecoration spec} {Claim : Type u}inArkLib/Interaction/Security.leantheorem completeness_pullbackinArkLib/Interaction/Boundary/Security.leantheorem isKnowledgeSound_implies_isSoundinArkLib/Interaction/Security.leanabbrev foldPhaseOD :inArkLib/ProofSystem/Fri/Interaction/FoldPhase.leanabbrev FoldCodewordPrefixinArkLib/ProofSystem/Fri/Interaction/Core.leandef rbrKnowledgeSoundnessinArkLib/Interaction/Security.leandef OracleCounterpart.mapOutput {ι : Type} {oSpec : OracleSpec.{0, 0} ι}inArkLib/Interaction/Oracle/Core.leandef totalShift : ℕinArkLib/ProofSystem/Fri/Interaction/Core.leanabbrev FoldChallengePrefix (i : ℕ) : TypeinArkLib/ProofSystem/Fri/Interaction/Core.leantheorem realizes_materializeIninArkLib/Interaction/Boundary/Reification.leantheorem roundOracleReduction_execute_eq_statefulinArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef verifierOutputinArkLib/Interaction/Oracle/Core.leandef RoundCheckProp {m_dom : ℕ} (D : Fin m_dom → R) (target : RoundClaim R)inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leantheorem partialEvalFirst_eval (a : R) (p : CMvPolynomial (n + 1) R) (v : Fin n → R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leandef perfectCompletenessinArkLib/Interaction/Oracle/Security.leandef accSpecAfter :inArkLib/Interaction/Oracle/Execution.leantheorem projectPublic_transcriptAppend :inArkLib/Interaction/Oracle/Spec.leandef Verifier.run {m : Type u → Type u} [Monad m]inArkLib/Interaction/Reduction.leanabbrev foldRoundChallengeinArkLib/ProofSystem/Fri/Interaction/Core.leandef OracleWitness :inArkLib/Interaction/Oracle/BCS.leandef evalPointVal (i : ℕ) (idx : EvalIdx (ninArkLib/ProofSystem/Fri/Interaction/Core.leandef Reduction.stateChainComp {m : Type u → Type u} [Monad m]inArkLib/Interaction/Reduction.leandef toVerifier {m : Type u → Type u} [Monad m]inArkLib/Interaction/Reduction.leandef knowledgeSoundnessinArkLib/Interaction/Security.leantheorem answerSplitLiftAppendQueryAppend_simOracle0inArkLib/Interaction/Oracle/Execution.leandef toUnivariate (p : CMvPolynomial 1 R) : CPolynomial RinArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leandef honestRoundPoly {m_dom : ℕ} (D : Fin m_dom → R)inArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef soundnessinArkLib/Interaction/Security.leanabbrev deserializeinArkLib/Interaction/FiatShamir/DuplexSponge.leanabbrev ReifiedInputLanguageinArkLib/Interaction/OracleReification.leantheorem appendLeft_range :inArkLib/Interaction/Oracle/Core.leandef runinArkLib/Interaction/Oracle/Execution.leandef OracleDecoration.QueryHandle :inArkLib/Interaction/Oracle/Core.leantheorem PublicTranscript.liftAppend_split :inArkLib/Interaction/Oracle/Spec.leandef nextRoundIdxinArkLib/ProofSystem/Fri/Interaction/Core.leandef roundFiberIdxinArkLib/ProofSystem/Fri/Interaction/Core.leanabbrev InputRelationinArkLib/Interaction/Oracle/Security.leantheorem foldNth_natDegree_le_of_leinArkLib/Data/CompPoly/Fold.leandef pullbackinArkLib/Interaction/Boundary/Reification.leanabbrev finalFoldChallengeinArkLib/ProofSystem/Fri/Interaction/Core.leandef toOracleSpec :inArkLib/Interaction/Oracle/Spec.leantheorem roundPoly_natDegree_le {deg : ℕ} (D : Fin m → R) {k : ℕ}inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leandef collapseAppendOracleCompinArkLib/Interaction/Oracle/Execution.leandef spongeReplayOracleinArkLib/Interaction/FiatShamir/DuplexSponge.leandef prefixShift (i : ℕ) : ℕinArkLib/ProofSystem/Fri/Interaction/Core.leandef buildSpongeReplayOracle :inArkLib/Interaction/FiatShamir/DuplexSponge.leanabbrev ReifiedOutputLanguageinArkLib/Interaction/OracleReification.leanabbrev EmptyOracleFamily : PEmpty → TypeinArkLib/ProofSystem/Fri/Interaction/Core.leandef liftAccinArkLib/Interaction/Oracle/Composition.leandef roles : {n : Nat} → (c : Chain n) → RoleDecoration (toSpec c)inArkLib/Interaction/Oracle/Continuation.leandef OracleDeco : HybridSpec → Type 1inArkLib/Interaction/BCS/HybridSpec.leandef liftOutputinArkLib/Interaction/Oracle/Core.leandef currentRoundResidual {n prefixLen : Nat} (h : prefixLen < n)inArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef QueryHandle.routeLeft :inArkLib/Interaction/Oracle/Spec.leandef fullSum {n : ℕ} {m_dom : ℕ} (D : Fin m_dom → R) (poly : PolyStmt R deg n) : RinArkLib/ProofSystem/Sumcheck/Interaction/Defs.leantheorem simulateQ_mapinArkLib/Interaction/Oracle/Execution.leandef projectInvariant :inArkLib/Interaction/BCS/HybridSpec.leandef statementResult {m_dom : Nat} (D : Fin m_dom → R) :inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leandef fsWitnessOutinArkLib/Interaction/FiatShamir/Transform.leandef Decoration.ofChain {S : Type u → Type v}inArkLib/Interaction/Reduction.leandef queryRoundOD :inArkLib/ProofSystem/Fri/Interaction/QueryRound.leantheorem roundOracleReduction_honestPubliclyEquivalentStatefulinArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef wrapWithCommitments :inArkLib/Interaction/Oracle/BCS.leandef plain :inArkLib/Interaction/BCS/HybridDecoration.leandef openingSpec {m : Type → Type}inArkLib/Interaction/BCS/Verifier.leantheorem simulates_pullbackinArkLib/Interaction/Boundary/OracleSecurity.leantheorem IsSound.bound_terminalProbinArkLib/Interaction/Security.leandef RealizesinArkLib/Interaction/Boundary/Reification.leandef pullbackVerifierinArkLib/Interaction/Boundary/Oracle.leandef soundnessinArkLib/Interaction/OracleSecurity.leandef retargetMonadsinArkLib/Interaction/Oracle/Composition.leantheorem OracleReduction.HonestExecutionEquivalent.toPublicinArkLib/Interaction/Oracle/Execution.leantheorem PublicTranscript.split_append :inArkLib/Interaction/Oracle/Spec.leanabbrev roundPoly (tr : Spec.Transcript (roundSpec R deg)) :inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leandef toInteractionSpec : Oracle.Spec → Interaction.SpecinArkLib/Interaction/Oracle/Spec.leantheorem Reduction.completeness_compinArkLib/Interaction/Security.leanabbrev PolyStmt (R : Type) [BEq R] [CommSemiring R] [LawfulBEq R]inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leandef pullbackSimulateinArkLib/Interaction/Boundary/Oracle.leanabbrev InteractiveOracleVerifier {ι : Type} (oSpec : OracleSpec.{0, 0} ι)inArkLib/Interaction/Oracle/Core.leandef routeInputQueriesinArkLib/Interaction/Boundary/Oracle.leantheorem evalSize_pos (i : ℕ) : 0 < evalSize (ninArkLib/ProofSystem/Fri/Interaction/Core.leandef OpeningDeco {m : Type → Type}inArkLib/Interaction/Oracle/BCS.leandef bcsPhase1ProverinArkLib/Interaction/BCS/Verifier.leandef OutputRealizesinArkLib/Interaction/OracleSecurity.leandef IsSound {m : Type u → Type u} [Monad m] [HasEvalSPMF m]inArkLib/Interaction/Security.leandef finalFoldContinuation {SharedIn : Type} {ι : Type} {oSpec : OracleSpec ι}inArkLib/ProofSystem/Fri/Interaction/FinalFold.leandef bcsSpec :inArkLib/Interaction/Oracle/BCS.leantheorem simulateQ_extinArkLib/Interaction/Oracle/Core.leanabbrev HonestPoly (i : ℕ)inArkLib/ProofSystem/Fri/Interaction/Core.leanabbrev foldPhaseRoles :inArkLib/ProofSystem/Fri/Interaction/FoldPhase.leanabbrev InputLanguageinArkLib/Interaction/Oracle/Security.leanabbrev OracleStatement {ιₛ : Type v} (OStmt : ιₛ → Type w)inArkLib/Interaction/Oracle/Core.leandef residualDegreeBound (i : ℕ) : ℕinArkLib/ProofSystem/Fri/Interaction/Core.leanabbrev roundTranscript (n : Nat)inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leandef outputAtEndinArkLib/Interaction/Oracle/Continuation.leandef soundnessinArkLib/Interaction/Oracle/Security.leandef liftAppendLeftContext :inArkLib/Interaction/Oracle/Core.leandef partialEvalLast (a : R) (p : CMvPolynomial (n + 1) R) : CMvPolynomial n RinArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leandef queryRoundSpec : SpecinArkLib/ProofSystem/Fri/Interaction/QueryRound.leaninstance instOracleInterfaceCMvDegreeLE :inArkLib/Data/CompPoly/Basic.leandef splitNth (n : ℕ) [NeZero n] (p : CPolynomial R) : Fin n → CPolynomial RinArkLib/Data/CompPoly/Fold.leandef roundProverStep (m : Type → Type) [Monad m]inArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef OutputRealizesinArkLib/Interaction/Oracle/Security.leantheorem reifiedKnowledgeSoundness_implies_reifiedSoundnessinArkLib/Interaction/OracleReification.leandef toClaimTree {spec : Spec} {roles : RoleDecoration spec} {Claim : Type u}inArkLib/Interaction/Security.leandef outputRelationOfRelationinArkLib/Interaction/OracleReification.leantheorem execute_pullbackinArkLib/Interaction/Boundary/Security.leandef fsRoles (Context : StatementIn → Spec.{u})inArkLib/Interaction/FiatShamir/Transform.leandef toMonadDecoration {ι : Type} (oSpec : OracleSpec.{0, 0} ι)inArkLib/Interaction/Oracle/Core.leandef runWithOracleCounterpartinArkLib/Interaction/Oracle/Execution.leandef queryBatchConsistentinArkLib/ProofSystem/Fri/Interaction/QueryRound.leandef roundCheck {m_dom : ℕ} (D : Fin m_dom → R) (target : RoundClaim R)inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leandef OracleQueryDeco :inArkLib/Interaction/Oracle/BCS.leandef fsContext (Context : StatementIn → Spec.{u})inArkLib/Interaction/FiatShamir/Transform.leantheorem realizes_simOracle0inArkLib/Interaction/OracleSecurity.leanabbrev FoldChallenges : TypeinArkLib/ProofSystem/Fri/Interaction/Core.leantheorem runWithOracleCounterpart_mapOutputWithRolesinArkLib/Interaction/Oracle/Execution.leantheorem splitPublicTranscript_appendPublicTranscript (n : Nat) (c : Chain (n + 1))inArkLib/Interaction/Oracle/Chain.leandef ofFunction [Monad m] (f : Data → m (CommType × WitnessType)) :inArkLib/CommitmentScheme/Basic.leandef ofOracleDecoration :inArkLib/Interaction/BCS/HybridDecoration.leandef evalSize (i : ℕ) : ℕinArkLib/ProofSystem/Fri/Interaction/Core.leandef foldRoundSpecinArkLib/ProofSystem/Fri/Interaction/Core.leanabbrev Prover {ι : Type} (oSpec : OracleSpec.{0, 0} ι)inArkLib/Interaction/Oracle/Core.leandef finalFoldRoles : RoleDecoration (finalFoldSpec (FinArkLib/ProofSystem/Fri/Interaction/Core.leantheorem sumcheckReduction_soundnessinArkLib/ProofSystem/Sumcheck/Interaction/General.leandef Reduction.toVerifierinArkLib/Interaction/Oracle/Core.leandef reifiedKnowledgeSoundnessinArkLib/Interaction/OracleReification.leanabbrev FoldCodewordOracleFamilyinArkLib/ProofSystem/Fri/Interaction/Core.leandef toSpecRoles : (hs : HybridSpec) → RoleDeco hs → RoleDecoration hs.toSpecinArkLib/Interaction/BCS/HybridSpec.leanabbrev squeezeLeninArkLib/Interaction/FiatShamir/DuplexSponge.leandef queryRoundContinuationinArkLib/ProofSystem/Fri/Interaction/QueryRound.leandef forgetExecuteWitnessinArkLib/Interaction/Oracle/Execution.leanabbrev OracleCounterpart {ι : Type} (oSpec : OracleSpec.{0, 0} ι)inArkLib/Interaction/Oracle/Core.leandef liftAppendRightContext :inArkLib/Interaction/Oracle/Core.leantheorem liftAppendOracleFamily_append_eqinArkLib/Interaction/Oracle/Execution.leanabbrev InputOracleFamilyinArkLib/ProofSystem/Fri/Interaction/Core.leantheorem toOracleSpec_appendRight :inArkLib/Interaction/Oracle/Spec.leandef PublicTranscript : Oracle.Spec → TypeinArkLib/Interaction/Oracle/Spec.leandef CommitDeco (m : Type → Type) : Oracle.Spec → Type 1inArkLib/Interaction/Oracle/BCS.leandef toOracleSpec :inArkLib/Interaction/BCS/HybridDecoration.leandef currentResidual {n prefixLen : Nat} (h : prefixLen ≤ n)inArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef roundSpec : SpecinArkLib/ProofSystem/Sumcheck/Interaction/Defs.leantheorem runWithOracleCounterpart_mapCounterpartOutputinArkLib/Interaction/Oracle/Execution.leantheorem answerQuery_appendLeft :inArkLib/Interaction/Oracle/Core.leantheorem simulate_compFlat {ι : Type} {oSpec : OracleSpec ι}inArkLib/Interaction/Oracle/Continuation.leantheorem simulateQ_compConcreteinArkLib/Interaction/OracleReification.leantheorem splitNth_toPoly (n : ℕ) [NeZero n] (p : CPolynomial R) (i : Fin n) :inArkLib/Data/CompPoly/Fold.leanabbrev OutputLanguageinArkLib/Interaction/Oracle/Security.leantheorem roundProverStep_map_fstinArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leantheorem perfectCompleteness_pullbackinArkLib/Interaction/Boundary/Security.leandef PublicTranscript.packAppend :inArkLib/Interaction/Oracle/Spec.leantheorem prefixShift_le_sub_roundinArkLib/ProofSystem/Fri/Interaction/Core.leandef SimulatesConcreteinArkLib/Interaction/OracleReification.leantheorem pullbackSimulate_evalinArkLib/Interaction/Boundary/Oracle.leandef toMonadDecoration {ι : Type} (oSpec : OracleSpec.{0, 0} ι)inArkLib/Interaction/Oracle/Spec.leantheorem toUnivariate_eval (p : CMvPolynomial 1 R) (x : R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leanabbrev fullOD (n : Nat) :inArkLib/ProofSystem/Sumcheck/Interaction/General.leantheorem OracleReduction.mapExecuteWitness_eq_execute_mappedOutputinArkLib/Interaction/Oracle/Execution.leandef partialEvalPrefix : {i k : ℕ} → (Fin i → R) → CMvPolynomial (i + k) R → CMvPolynomial k RinArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leandef answerSplitLiftAppendQueryinArkLib/Interaction/OracleReification.leantheorem rbrKnowledgeSoundness_implies_rbrSoundnessinArkLib/Interaction/Security.leantheorem partialEvalLast_eval (a : R) (p : CMvPolynomial (n + 1) R) (v : Fin n → R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leandef foldRoundRolesinArkLib/ProofSystem/Fri/Interaction/Core.leandef OracleDecoration.oracleContextImplinArkLib/Interaction/Oracle/Core.leandef transcriptAppend :inArkLib/Interaction/Oracle/Spec.leantheorem prefixShift_succ (i : Fin (k + 1)) :inArkLib/ProofSystem/Fri/Interaction/Core.leandef OracleReduction.stateChainComp {ι : Type} {oSpec : OracleSpec ι}inArkLib/Interaction/Oracle/StateChain.leandef RealizesinArkLib/Interaction/OracleSecurity.leantheorem foldNth_toPoly (n : ℕ) [NeZero n] (p : CPolynomial R) (α : R) :inArkLib/Data/CompPoly/Fold.leandef ofRevealCheck [Monad m] [oi : OracleInterface Data]inArkLib/CommitmentScheme/Basic.leandef mapExecuteWitnessinArkLib/Interaction/Oracle/Execution.leandef Strategy.ofChain {m : Type u → Type u} [Monad m]inArkLib/Interaction/Reduction.leandef Reduction.comp {m : Type u → Type u} [Monad m]inArkLib/Interaction/Reduction.leandef AcceptsinArkLib/Interaction/OracleSecurity.leandef projectShared {m : Type → Type} :inArkLib/Interaction/BCS/HybridSpec.leandef toSpec : {n : Nat} → Chain n → SpecinArkLib/Interaction/Oracle/Continuation.leaninstance of interpreter lifting (cf. Xia et al., *Interaction Trees*): the innerinArkLib/Interaction/Boundary/Oracle.leandef Prover.duplexSpongeFiatShamirinArkLib/Interaction/FiatShamir/DuplexSponge.leandef finalFoldOD :inArkLib/ProofSystem/Fri/Interaction/Core.leanabbrev PublicCoinVerifier (m : Type u → Type u)inArkLib/Interaction/Reduction.leantheorem Spec.runWithOracleCounterpart_mapOutputWithRolesinArkLib/Interaction/Oracle/Execution.leandef pullbackinArkLib/Interaction/Boundary/Oracle.leanabbrev OutputRelationinArkLib/Interaction/OracleSecurity.leantheorem partialEvalPrefix_individualDegreeLE {deg : ℕ} :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leandef inputRelationOfReifiedRelationinArkLib/Interaction/OracleReification.leandef foldRoundContinuation {SharedIn : Type} {ι : Type} {oSpec : OracleSpec ι}inArkLib/ProofSystem/Fri/Interaction/FoldRound.leaninstance instOracleInterfaceCDegreeLE [Semiring R] :inArkLib/Data/CompPoly/Basic.leantheorem toSpec_succ {n : Nat} (spec : Oracle.Spec)inArkLib/Interaction/Oracle/Chain.leantheorem OracleReduction.executePublic_eq_map_executeinArkLib/Interaction/Oracle/Execution.leandef Terminal {spec : Spec} {roles : RoleDecoration spec} {Claim : Type u}inArkLib/Interaction/Security.leandef answerSplitLiftAppendQueryAppendinArkLib/Interaction/Oracle/Execution.leanabbrev fullSpec (n : Nat) : SpecinArkLib/ProofSystem/Sumcheck/Interaction/Defs.leantheorem toUnivariate_natDegree_le {deg : ℕ}inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leandef Reduction.execute {m : Type u → Type u} [Monad m]inArkLib/Interaction/Reduction.leandef QueryHandle.appendLeft :inArkLib/Interaction/Oracle/Spec.leanabbrev InputWitness : TypeinArkLib/ProofSystem/Fri/Interaction/Protocol.leanabbrev ReifiedInputRelationinArkLib/Interaction/OracleReification.leantheorem toInteractionSpec_append :inArkLib/Interaction/Oracle/Spec.leandef CDegreeLE (R : Type) [BEq R] [Semiring R] [LawfulBEq R] (d : ℕ)inArkLib/Data/CompPoly/Basic.leandef RoleDeco.append :inArkLib/Interaction/Oracle/Spec.leandef append : (s₁ : Oracle.Spec) → (PublicTranscript s₁ → Oracle.Spec) → Oracle.SpecinArkLib/Interaction/Oracle/Spec.leantheorem simulateQ_liftAppendLeftContext_eqinArkLib/Interaction/Oracle/Core.leanabbrev IsCompleteinArkLib/Interaction/Boundary/Compatibility.leandef completenessinArkLib/Interaction/OracleSecurity.leandef toOracleDeco : (n : Nat) → (c : Chain n) → OracleDeco (toSpec n c)inArkLib/Interaction/Oracle/Chain.leanabbrev challenge {X : Type u} {rest : X → Spec} {rRest : ∀ x, RoleDecoration (rest x)}inArkLib/Interaction/FiatShamir/Basic.leandef PublicTranscript.liftAppend :inArkLib/Interaction/Oracle/Spec.leandef executeConcreteinArkLib/Interaction/Oracle/Execution.leandef bcsPhase2VerifierinArkLib/Interaction/BCS/Verifier.leandef QueryHandle.splitAppend :inArkLib/Interaction/Oracle/Spec.leantheorem extractBack_follow : {spec : Spec} → {roles : RoleDecoration spec} → {Claim : Type u} →inArkLib/Interaction/Security.leanabbrev OutputinArkLib/Interaction/OracleReification.leandef knowledgeSoundnessinArkLib/Interaction/Oracle/Security.leandef bcsPhase1VerifierinArkLib/Interaction/BCS/Verifier.leandef queryBatchConsistentQinArkLib/ProofSystem/Fri/Interaction/QueryRound.leantheorem pullbackSimulate_materializeinArkLib/Interaction/Boundary/Reification.leandef CommitDeco (m : Type → Type) : HybridSpec → Type 1inArkLib/Interaction/BCS/HybridSpec.leaninstance instOracleInterfaceCMvPolynomial :inArkLib/Data/CompPoly/Basic.leantheorem roundProverStep_map_honestProverOutputWitnessinArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leantheorem partialEvalFirst_individualDegreeLE {deg : ℕ} (a : R)inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leanabbrev stmt {StatementOut : Type u} {WitnessOut : Type v}inArkLib/Interaction/Reduction.leandef sumAllButFirst (D : Fin m → R) : (k : ℕ) → CMvPolynomial (k + 1) R → CMvPolynomial 1 RinArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leantheorem Reduction.perfectCompleteness_compinArkLib/Interaction/Security.leandef IsKnowledgeSound {m : Type u → Type u} [Monad m] [HasEvalSPMF m]inArkLib/Interaction/Security.leandef bcsSpec :inArkLib/Interaction/BCS/HybridSpec.leantheorem simulateQ_cast_specinArkLib/Interaction/Oracle/Core.leanabbrev PolyFamily (R : Type) [BEq R] [CommSemiring R] [LawfulBEq R]inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leandef bcsPhase1ProverinArkLib/Interaction/Oracle/BCS.leandef bcsRoles :inArkLib/Interaction/BCS/HybridSpec.leandef honestCodeword (i : ℕ) (p : HonestPoly (FinArkLib/ProofSystem/Fri/Interaction/Core.leandef Reduction.executeConcreteinArkLib/Interaction/Oracle/Execution.leandef projectPublic :inArkLib/Interaction/Oracle/Spec.leandef bcsPhase2inArkLib/Interaction/Oracle/BCS.leantheorem sumOverLast_eval (D : Fin m → R) (p : CMvPolynomial (n + 1) R) (v : Fin n → R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leantheorem roundProverStepStateful_fromResidualinArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leanabbrev EvalIdx (i : ℕ)inArkLib/ProofSystem/Fri/Interaction/Core.leandef bcsHybridDeco :inArkLib/Interaction/BCS/Verifier.leanabbrev ReifiedOutputRelationinArkLib/Interaction/OracleReification.leandef RoleDeco : Oracle.Spec → TypeinArkLib/Interaction/Oracle/Spec.leandef maxPathError {spec : Spec} {roles : RoleDecoration spec} {Claim : Type u}inArkLib/Interaction/Security.leandef reifiedSoundnessinArkLib/Interaction/OracleReification.leandef Reduction.ofChaininArkLib/Interaction/Oracle/Chain.leandef toSpec : HybridSpec → SpecinArkLib/Interaction/BCS/HybridSpec.leandef PublicCoinVerifier.fiatShamirinArkLib/Interaction/FiatShamir/Transform.leandef foldRoundODinArkLib/ProofSystem/Fri/Interaction/Core.leantheorem PublicTranscript.liftAppend_append :inArkLib/Interaction/Oracle/Spec.leantheorem roundContinuation_publicEq_statefulinArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leanabbrev HonestProverOutput (StatementOut : Type u) (WitnessOut : Type v)inArkLib/Interaction/Reduction.leandef answerQuery :inArkLib/Interaction/BCS/HybridDecoration.leandef RoleDeco : HybridSpec → TypeinArkLib/Interaction/BCS/HybridSpec.leantheorem honestFoldPoly_natDegree_le {i : Fin k}inArkLib/ProofSystem/Fri/Interaction/Core.leandef bcsPhase1VerifierinArkLib/Interaction/Oracle/BCS.leanabbrev InputStatement : TypeinArkLib/ProofSystem/Fri/Interaction/Protocol.leandef HonestPubliclyEquivalentinArkLib/Interaction/Oracle/Execution.leandef outputFamilyinArkLib/Interaction/Oracle/Continuation.leandef bcsProjectShared :inArkLib/Interaction/BCS/HybridSpec.leanconstant byOracleDecoration(oracle messages don't branch). We pick theinArkLib/Interaction/Oracle/Bridge.leandef bcsProjectShared :inArkLib/Interaction/Oracle/BCS.leandef restrictRight {r : Type → Type} [Monad r] :inArkLib/Interaction/Oracle/Spec.leandef QueryHandle :inArkLib/Interaction/Oracle/Spec.leantheorem PublicTranscript.append_split :inArkLib/Interaction/Oracle/Spec.leandef foldNth (n : ℕ) [NeZero n] (p : CPolynomial R) (α : R) :inArkLib/Data/CompPoly/Fold.leandef honestFinalPolynomialinArkLib/ProofSystem/Fri/Interaction/Core.leandef QueryHandle.routeRight :inArkLib/Interaction/Oracle/Spec.leandef pullbackSharedinArkLib/Interaction/Oracle/Continuation.leandef OracleDecoration.toOracleSpec :inArkLib/Interaction/Oracle/Core.leandef routeInputQueriesInnerEvalinArkLib/Interaction/Boundary/Oracle.leanabbrev OracleDecoration (spec : Spec) (roles : RoleDecoration spec)inArkLib/Interaction/Oracle/Core.leandef queryRoundRoles : RoleDecoration (queryRoundSpec (ninArkLib/ProofSystem/Fri/Interaction/QueryRound.leandef SharedTranscript {m : Type → Type} :inArkLib/Interaction/BCS/HybridSpec.leandef toSpecRoles : (s : Oracle.Spec) → RoleDeco s → RoleDecoration s.toInteractionSpecinArkLib/Interaction/Oracle/Spec.leantheorem roundPoly_eval (D : Fin m → R) (k : ℕ) (p : CMvPolynomial (k + 1) R) (x : R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leanabbrev InputImplinArkLib/Interaction/Oracle/Security.leandef terminalGood {spec : Spec} {roles : RoleDecoration spec} {Claim : Type u}inArkLib/Interaction/Security.leantheorem simulateQ_add_liftComp_leftinArkLib/Interaction/Boundary/Oracle.leanabbrev ReplayOracle (spec : Spec.{u}) (roles : RoleDecoration spec) : Type uinArkLib/Interaction/FiatShamir/Basic.leantheorem rbrKnowledgeSoundness_implies_knowledgeSoundnessinArkLib/Interaction/Security.leanabbrev QueryResult : TypeinArkLib/ProofSystem/Fri/Interaction/QueryRound.leantheorem simulateQ_composeinArkLib/Interaction/Boundary/Oracle.leantheorem answerQuery_appendRight :inArkLib/Interaction/Oracle/Core.leandef bcsOracleDeco :inArkLib/Interaction/Oracle/BCS.leandef Chain : Nat → Type 1inArkLib/Interaction/Oracle/Chain.leandef outputFamilyinArkLib/Interaction/Oracle/Chain.leandef liftAppendRightQuery :inArkLib/Interaction/Oracle/Core.leandef sumOverLast (D : Fin m → R) (p : CMvPolynomial (n + 1) R) : CMvPolynomial n RinArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leaninstance instOracleInterfaceEmptyOracleFamily :inArkLib/ProofSystem/Fri/Interaction/Core.leandef evalAtIdx (p : CPolynomial F) {i : ℕ} (idx : EvalIdx (ninArkLib/ProofSystem/Fri/Interaction/Core.leandef openingRoles {m : Type → Type}inArkLib/Interaction/BCS/Verifier.leandef partialEvalFirst (a : R) (p : CMvPolynomial (n + 1) R) : CMvPolynomial n RinArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leandef splitLiftAppendOracleQueryinArkLib/Interaction/Oracle/Execution.leanabbrev afterMessageinArkLib/Interaction/FiatShamir/DuplexSponge.leandef fsStatementOutinArkLib/Interaction/FiatShamir/Transform.leantheorem realizes_materializeOutinArkLib/Interaction/Boundary/Reification.leandef PublicTranscript.append :inArkLib/Interaction/Oracle/Spec.leandef honestFoldPoly {i : Fin k}inArkLib/ProofSystem/Fri/Interaction/Core.leanabbrev InputImplinArkLib/Interaction/OracleSecurity.leanabbrev OutputImplinArkLib/Interaction/OracleSecurity.leantheorem simulateQ_liftIdinArkLib/Interaction/Boundary/Oracle.leandef bcsPhase2ProverinArkLib/Interaction/BCS/Verifier.leanabbrev Codeword (_s : Fin (k + 1) → ℕ+) (_n : ℕ) (i : ℕ) : TypeinArkLib/ProofSystem/Fri/Interaction/Core.leandef inputLanguageOfReifiedLanguageinArkLib/Interaction/OracleReification.leandef initialCodewords (codeword : Codeword (FinArkLib/ProofSystem/Fri/Interaction/Core.leandef roundAnchorIdxinArkLib/ProofSystem/Fri/Interaction/Core.leandef PublicTranscript.split :inArkLib/Interaction/Oracle/Spec.leandef runConcreteinArkLib/Interaction/Oracle/Execution.leandef MessagesOnly :inArkLib/Interaction/FiatShamir/Basic.leandef toVerifierinArkLib/Interaction/Oracle/Core.leandef executeinArkLib/Interaction/Oracle/Continuation.leanabbrev liftAppendOracleIdxinArkLib/Interaction/Oracle/Execution.leanabbrev wit {StatementOut : Type u} {WitnessOut : Type v}inArkLib/Interaction/Reduction.leandef challengePrefix (n : Nat) (tr : Spec.Transcript (fullSpec R deg n)) :inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leanabbrev FSStatement (StatementIn : Type u) (Context : StatementIn → Spec.{u})inArkLib/Interaction/FiatShamir/Transform.leandef accImplAfter :inArkLib/Interaction/Oracle/Execution.leandef PublicTranscript.unliftAppend :inArkLib/Interaction/Oracle/Spec.leandef od : {n : Nat} → (c : Chain n) → OracleDecoration (toSpec c) (roles c)inArkLib/Interaction/Oracle/Continuation.leandef QueryHandle.appendRight :inArkLib/Interaction/Oracle/Spec.leandef PublicCoinReduction.duplexSpongeFiatShamirinArkLib/Interaction/FiatShamir/DuplexSponge.leandef roundOracleDecoration :inArkLib/ProofSystem/Sumcheck/Interaction/Oracle.leanabbrev serializeinArkLib/Interaction/FiatShamir/DuplexSponge.leandef appendPublicTranscript (n : Nat) (c : Chain (n + 1))inArkLib/Interaction/Oracle/Chain.leandef appendRight :inArkLib/Interaction/Oracle/Core.leanabbrev roundChallenge (tr : Spec.Transcript (roundSpec R deg)) :inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leandef SharedTranscript {m : Type → Type} :inArkLib/Interaction/Oracle/BCS.leandef remainingShift (i : ℕ) : ℕinArkLib/ProofSystem/Fri/Interaction/Core.leanabbrev afterMessage {X : Type u} {rest : X → Spec} {rRest : ∀ x, RoleDecoration (rest x)}inArkLib/Interaction/FiatShamir/Basic.leandef roundRoles : RoleDecoration (roundSpec R deg)inArkLib/ProofSystem/Sumcheck/Interaction/Defs.leandef OracleDeco : Oracle.Spec → Type 1inArkLib/Interaction/Oracle/Spec.leantheorem IsKnowledgeSound.good_extractBackinArkLib/Interaction/Security.leandef pullback {m : Type _ → Type _} [Monad m] [Functor m]inArkLib/Interaction/Boundary/Core.leandef idinArkLib/Interaction/Oracle/Continuation.leandef restrictLeft {r : Type → Type} [Monad r] :inArkLib/Interaction/Oracle/Spec.leanabbrev finalFoldPolynomialinArkLib/ProofSystem/Fri/Interaction/Core.leandef compinArkLib/Interaction/Oracle/Chain.leandef inputRelationOfRelationinArkLib/Interaction/OracleReification.leandef routeInputQueriesOuterEvalinArkLib/Interaction/Boundary/Oracle.leandef Reduction.pullbackSharedinArkLib/Interaction/Oracle/Composition.leantheorem routeInnerOutputQueries_evalinArkLib/Interaction/Boundary/Oracle.leanabbrev QueryBatch : TypeinArkLib/ProofSystem/Fri/Interaction/QueryRound.leanabbrev rolesinArkLib/Interaction/Reduction.leanabbrev VerifierOutputinArkLib/Interaction/Oracle/Core.leandef IndividualDegreeLE (deg : ℕ) (p : CMvPolynomial n R) : PropinArkLib/Data/CompPoly/Basic.leantheorem simulateQ_liftAppendRightContext_eqinArkLib/Interaction/Oracle/Core.leandef Reduction.idinArkLib/Interaction/Oracle/Composition.leandef Reduction.compinArkLib/Interaction/Oracle/Composition.leandef randomChallenger (sample : (T : Type) → ProbComp T) :inArkLib/Interaction/Security.leantheorem simulateQ_add_liftComp_rightinArkLib/Interaction/Boundary/Oracle.leanabbrev foldPhaseContext : SpecinArkLib/ProofSystem/Fri/Interaction/FoldPhase.leandef PublicCoinVerifier.duplexSpongeFiatShamirinArkLib/Interaction/FiatShamir/DuplexSponge.leantheorem simulateQ_castinArkLib/Interaction/Oracle/Core.leandef toMonadDecoration {ι : Type} (oSpec : OracleSpec.{0, 0} ι)inArkLib/Interaction/BCS/HybridReduction.leandef reifiedCompletenessinArkLib/Interaction/OracleReification.leandef SpongeAnnotation (U : Type) :inArkLib/Interaction/FiatShamir/DuplexSponge.leandef Reduction.ofChain {m : Type u → Type u} [Monad m]inArkLib/Interaction/Reduction.leandef finalFoldSpec : SpecinArkLib/ProofSystem/Fri/Interaction/Core.leandef runinArkLib/Interaction/Oracle/Continuation.leandef foldPhaseContinuation {ι : Type} {oSpec : OracleSpec ι}inArkLib/ProofSystem/Fri/Interaction/FoldPhase.leandef outputRelationOfReifiedRelationinArkLib/Interaction/OracleReification.leandef answerSplitLiftAppendQueryinArkLib/Interaction/Oracle/Execution.leandef appendLeft :inArkLib/Interaction/Oracle/Core.leanabbrev HybridDecoration (spec : Spec) (roles : RoleDecoration spec)inArkLib/Interaction/BCS/HybridDecoration.leantheorem routeInnerOutputQueries_materializeinArkLib/Interaction/Boundary/Reification.leandef completenessinArkLib/Interaction/Oracle/Security.leantheorem liftM_cast_query_add_rightinArkLib/Interaction/Oracle/Core.leanabbrev Prover (m : Type u → Type u)inArkLib/Interaction/Reduction.leandef promoteStatementToSharedinArkLib/Interaction/Oracle/Continuation.leandef perfectCompletenessinArkLib/Interaction/OracleSecurity.leandef outputinArkLib/Interaction/OracleReification.leantheorem simulate_comp {ι : Type} {oSpec : OracleSpec ι}inArkLib/Interaction/Oracle/Continuation.leantheorem roundContinuationOption_proverEq_statefulinArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leanabbrev OutputLanguageinArkLib/Interaction/OracleSecurity.leandef honestRoundPolyAtPrefix {m_dom : ℕ} (D : Fin m_dom → R)inArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef answerQuery :inArkLib/Interaction/Oracle/Spec.leandef toReduction {m : Type u → Type u} [Monad m]inArkLib/Interaction/Reduction.leantheorem roundOracleReduction_executePublic_eq_statefulinArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef bcsRoleDeco :inArkLib/Interaction/Oracle/BCS.leandef outputLanguageOfReifiedLanguageinArkLib/Interaction/OracleReification.leandef Prover.fiatShamirinArkLib/Interaction/FiatShamir/Transform.leandef toRoles : (n : Nat) → (c : Chain n) → RoleDeco (toSpec n c)inArkLib/Interaction/Oracle/Chain.leantheorem evalSize_factorinArkLib/ProofSystem/Fri/Interaction/Core.leandef InvariantTranscript : HybridSpec → TypeinArkLib/Interaction/BCS/HybridSpec.leantheorem routeInputQueries_evalinArkLib/Interaction/Boundary/Oracle.leantheorem simulateQ_cast_depinArkLib/Interaction/Oracle/Core.leandef reifiedPerfectCompletenessinArkLib/Interaction/OracleReification.leantheorem simulateQ_cast_queryinArkLib/Interaction/Oracle/Core.leandef Verifier.runinArkLib/Interaction/Oracle/Execution.leantheorem IsKnowledgeSound.bound_terminalProbinArkLib/Interaction/Security.leantheorem soundness_compinArkLib/Interaction/Security.leanabbrev afterChallengeinArkLib/Interaction/FiatShamir/DuplexSponge.leantheorem probAccept_pullback_leinArkLib/Interaction/Boundary/Security.leantheorem roundOracleReduction_honestExecutionEquivalentStatefulinArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leantheorem simulateQ_collapseAppendOracleCompinArkLib/Interaction/Oracle/Execution.leanabbrev verifierMDinArkLib/Interaction/Oracle/Core.leandef OracleQueryDeco :inArkLib/Interaction/BCS/Verifier.leandef replay {m : Type u → Type u} [Monad m]inArkLib/Interaction/Reduction.leanabbrev Proof (m : Type u → Type u)inArkLib/Interaction/Reduction.leandef splitPublicTranscript (n : Nat) (c : Chain (n + 1)) :inArkLib/Interaction/Oracle/Chain.leandef routeInnerOutputQueriesinArkLib/Interaction/Boundary/Oracle.leandef evalPoint (i : ℕ) (idx : EvalIdx (ninArkLib/ProofSystem/Fri/Interaction/Core.leandef compAuxinArkLib/Interaction/Oracle/Composition.leandef comp {ι : Type} {oSpec : OracleSpec ι}inArkLib/Interaction/Oracle/Continuation.leantheorem roundProverStep_map_residualWitnessinArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.leandef toFSStatementinArkLib/Interaction/FiatShamir/DuplexSponge.leandef OracleWitness :inArkLib/Interaction/BCS/HybridSpec.leandef rbrSoundnessinArkLib/Interaction/Security.leanabbrev afterChallenge {X : Type u} {rest : X → Spec} {rRest : ∀ x, RoleDecoration (rest x)}inArkLib/Interaction/FiatShamir/Basic.leandef roundPoly (D : Fin m → R) (k : ℕ) (p : CMvPolynomial (k + 1) R) : CPolynomial RinArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leanabbrev liftAppendOracleFamilyinArkLib/Interaction/Oracle/Execution.leandef OracleResponseDeco :inArkLib/Interaction/Oracle/BCS.leandef Reduction.perfectCompletenessinArkLib/Interaction/Security.leandef OracleContext.toOracleStatementinArkLib/Interaction/Boundary/Reification.leantheorem toOracleSpec_appendLeft :inArkLib/Interaction/Oracle/Spec.leandef Spec.runWithOracleCounterpartinArkLib/Interaction/Oracle/Execution.leantheorem honestFinalPolynomial_natDegree_leinArkLib/ProofSystem/Fri/Interaction/Core.leantheorem sumAllButFirst_eval (D : Fin m → R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.leandef OracleDecoration.answerQuery :inArkLib/Interaction/Oracle/Core.leandef HonestExecutionEquivalentinArkLib/Interaction/Oracle/Execution.leaninstance instOracleInterfaceCPolynomial [Nontrivial R] :inArkLib/Data/CompPoly/Basic.leandef toSpec : (n : Nat) → Chain n → Oracle.SpecinArkLib/Interaction/Oracle/Chain.leandef answerCommittedQueries :inArkLib/Interaction/Oracle/BCS.leanabbrev InputRelationinArkLib/Interaction/OracleSecurity.leandef knowledgeSoundnessinArkLib/Interaction/OracleSecurity.leandef pullbackCounterpartinArkLib/Interaction/Boundary/Oracle.leantheorem runWithOracleCounterpart_pullbackCounterpart_rawinArkLib/Interaction/Boundary/Oracle.leantheorem answerSplitLiftAppendQueryAppend_eqinArkLib/Interaction/Oracle/Execution.leandef executePublicConcreteinArkLib/Interaction/Oracle/Execution.leandef freezeSharedToPUnitinArkLib/Interaction/Oracle/Continuation.leanabbrev IsSoundinArkLib/Interaction/Boundary/Compatibility.leanabbrev FinalStatement : TypeinArkLib/ProofSystem/Fri/Interaction/Core.leandef Strategy.runWithReplayOracle {m : Type u → Type u} [Monad m] :inArkLib/Interaction/FiatShamir/Transform.leandef wrapWithCommitmentsExt :inArkLib/Interaction/Oracle/BCS.leantheorem splitLiftAppendOracleRange_eqinArkLib/Interaction/Oracle/Execution.leandef CMvDegreeLEinArkLib/Data/CompPoly/Basic.leandef projectShared {m : Type → Type} :inArkLib/Interaction/Oracle/BCS.leandef good {spec : Spec} {roles : RoleDecoration spec} {Claim : Type u}inArkLib/Interaction/Security.leantheorem sumcheckReduction_completenessinArkLib/ProofSystem/Sumcheck/Interaction/General.leandef OracleResponseDeco :inArkLib/Interaction/BCS/Verifier.leantheorem run_pullbackinArkLib/Interaction/Boundary/Security.leandef initialChallenges : FoldChallengePrefix (FinArkLib/ProofSystem/Fri/Interaction/Core.leandef liftAppendLeftQuery :inArkLib/Interaction/Oracle/Core.leanabbrev RoundClaiminArkLib/ProofSystem/Sumcheck/Interaction/Defs.leanabbrev OutputImplinArkLib/Interaction/Oracle/Security.leandef OpeningDeco (m : Type → Type) :inArkLib/Interaction/BCS/Verifier.leantheorem runWithOracleCounterpart_pullbackCounterpartinArkLib/Interaction/Boundary/Oracle.leandef roundArity (i : Fin (k + 1)) : ℕinArkLib/ProofSystem/Fri/Interaction/Core.leandef OracleDeco.append :inArkLib/Interaction/Oracle/Spec.leandef deriveTranscript :inArkLib/Interaction/FiatShamir/Basic.leantheorem toMonadDecoration_appendinArkLib/Interaction/Oracle/Execution.leandef wrapWithCommitments :inArkLib/Interaction/BCS/HybridSpec.leandef PublicCoinReduction.fiatShamirinArkLib/Interaction/FiatShamir/Transform.leanabbrev OutputRelationinArkLib/Interaction/Oracle/Security.leantheorem knowledgeSoundness_implies_soundnessinArkLib/Interaction/Oracle/Security.leanabbrev foldRoundCodewordinArkLib/ProofSystem/Fri/Interaction/Core.leandef QueryHandle :inArkLib/Interaction/BCS/HybridDecoration.lean
sorry Tracking
❌ **Added:** 25 `sorry`(s)
def bcsProjectShared :inArkLib/Interaction/BCS/HybridSpec.lean(L214)theorem sumOverLast_eval (D : Fin m → R) (p : CMvPolynomial (n + 1) R) (v : Fin n → R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L116)def bcsPhase2VerifierinArkLib/Interaction/BCS/Verifier.lean(L282)def openingSpec {m : Type → Type}inArkLib/Interaction/BCS/Verifier.lean(L248)theorem honestFinalPolynomial_natDegree_leinArkLib/ProofSystem/Fri/Interaction/Core.lean(L322)theorem sumAllButFirst_eval (D : Fin m → R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L125)def bcsPhase2ProverinArkLib/Interaction/BCS/Verifier.lean(L270)theorem partialEvalPrefix_individualDegreeLE {deg : ℕ} :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L144)theorem partialEvalPrefix_individualDegreeLE {deg : ℕ} :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L149)theorem partialEvalPrefix_individualDegreeLE {deg : ℕ} :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L170)theorem partialEvalPrefix_individualDegreeLE {deg : ℕ} :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L171)theorem partialEvalPrefix_individualDegreeLE {deg : ℕ} :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L172)theorem partialEvalPrefix_individualDegreeLE {deg : ℕ} :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L173)theorem toUnivariate_eval (p : CMvPolynomial 1 R) (x : R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L194)theorem foldNth_natDegree_le_of_leinArkLib/Data/CompPoly/Fold.lean(L59)theorem partialEvalFirst_individualDegreeLE {deg : ℕ} (a : R)inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L136)theorem partialEvalLast_eval (a : R) (p : CMvPolynomial (n + 1) R) (v : Fin n → R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L109)theorem toUnivariate_natDegree_le {deg : ℕ}inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L213)theorem roundPoly_natDegree_le {deg : ℕ} (D : Fin m → R) {k : ℕ}inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L221)theorem honestFoldPoly_natDegree_le {i : Fin k}inArkLib/ProofSystem/Fri/Interaction/Core.lean(L306)theorem knowledgeSoundness_implies_soundnessinArkLib/Interaction/Oracle/Security.lean(L542)theorem foldNth_toPoly (n : ℕ) [NeZero n] (p : CPolynomial R) (α : R) :inArkLib/Data/CompPoly/Fold.lean(L53)theorem partialEvalFirst_eval (a : R) (p : CMvPolynomial (n + 1) R) (v : Fin n → R) :inArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean(L102)theorem splitNth_toPoly (n : ℕ) [NeZero n] (p : CPolynomial R) (i : Fin n) :inArkLib/Data/CompPoly/Fold.lean(L49)def openingRoles {m : Type → Type}inArkLib/Interaction/BCS/Verifier.lean(L256)
🎨 **Style Guide Adherence**
The following violations of the style guide were identified:
Line Length (> 20 violations)
- Rule: "Keep lines under 100 characters."
- Examples:
ArkLib/Interaction/BCS/HybridReduction.lean:87:(OStatementOut : (shared : SharedIn) → (tr : Spec.Transcript (Context shared)) → ιₛₒ shared tr → Type)(108 characters)ArkLib/Interaction/Oracle/Continuation.lean:621:(OStatementOut : (shared : SharedIn) → (tr : Spec.Transcript (ctx₁ shared)) → (tr₂ : Spec.Transcript (ctx₂ shared tr₁)) → ιₛₒ shared tr₁ tr₂ → Type)(134 characters)ArkLib/Interaction/Oracle/Execution.lean:180:(qOut : ([liftAppendOracleFamily spec₁ spec₂ ιₛ OStmt (Spec.Transcript.append spec₁ spec₂ tr₁ tr₂)]ₒ).Domain) →(110 characters)
Naming Conventions - Acronyms (> 20 violations)
- Rule: "Acronyms: Treat as words (e.g.,
HtmlParsernotHTMLParser)." - Examples:
ArkLib/Data/CompPoly/Basic.lean:33:CDegreeLEshould beCDegreeLe.ArkLib/Data/CompPoly/Basic.lean:51:toOCshould betoOc.ArkLib/Interaction/BCS/HybridReduction.lean:38: NamespaceBCSshould beBcs.ArkLib/Interaction/Oracle/Core.lean:45:OStmtshould beOstmt.
Variable Conventions (> 20 violations)
- Rule: "
α, β, γ, ... : Generic types", "u, v, w, ... : Universes". - Examples:
ArkLib/Data/CompPoly/Basic.lean:25:Rused for aType; should useαor similar generic type variable.ArkLib/Interaction/BCS/HybridSpec.lean:69:Xused for aType; should useα.ArkLib/Interaction/BCS/HybridReduction.lean:44:ιused for aType; should useα.ArkLib/Interaction/BCS/HybridReduction.lean:32:u, v, wused as universe variables; this is correct, but many other files useιfor types.
Syntax and Formatting - File Headers
- Rule: "Use standard file headers including copyright, license (Apache 2.0), and authors."
- The following files are missing the standard file header:
ArkLib/Interaction/Boundary/Compatibility.leanArkLib/Interaction/Boundary/Core.leanArkLib/Interaction/Boundary/Oracle.leanArkLib/Interaction/Boundary/OracleSecurity.leanArkLib/Interaction/Boundary/Reification.leanArkLib/Interaction/Boundary/Security.leanArkLib/Interaction/OracleReification.leanArkLib/Interaction/OracleSecurity.lean
Syntax and Formatting - Indentation
- Rule: "Indentation: Use 2 spaces for indentation."
ArkLib/Data/CompPoly/Basic.lean:50:Query := Fin n → R(3-space indentation).ArkLib/Data/CompPoly/Basic.lean:57:Query := R(3-space indentation).ArkLib/Data/CompPoly/Basic.lean:64:Query := R(3-space indentation).ArkLib/Data/CompPoly/Basic.lean:71:Query := Fin n → R(3-space indentation).
Documentation Standards - Docstring Quality
- Rule: "Docstrings must describe what a definition is or what a theorem states... references to... reactive language (e.g., 'renamed from X', 'replaces the old Y') are prohibited."
ArkLib/CommitmentScheme/Basic.lean:25: "...and will eventually supersede the legacy versions." (Uses reactive language/describes future change history).
📄 **Per-File Summaries**
-
AGENTS.md: This update refines the project's guardrails by introducing stylistic preferences for readable notation, term-style definitions, and the use of existing library combinators over bespoke helpers. It also clarifies global configuration settings for
autoImplicitand establishes stricter quality and maintenance standards for docstrings and wiki documentation. - ArkLib.lean: This update expands the library's top-level exports by importing several new modules focused on interactive protocols, oracle boundaries, and security reductions. Specifically, it integrates new infrastructure for Fiat-Shamir transforms and BCS-related protocols, alongside interactive implementations of the FRI and Sumcheck proof systems.
-
ArkLib/CommitmentScheme/Basic.lean: Introduces a new modular framework for commitment schemes under the
Interactionnamespace, adding definitions forCommit,Opening, andCommitmentSchemestructures. These interaction-based versions are designed to eventually supersede legacy definitions and include constructor functions likeofFunctionandofRevealCheckto build protocols from standard functions. Nosorryoradmitplaceholders were added. -
ArkLib/Data/CompPoly/Basic.lean: This file introduces definitions for degree-bounded univariate and multivariate computable polynomials, including a predicate for individual variable degrees. It also provides several
OracleInterfaceinstances to enable evaluation queries on these polynomial types within the library's oracle framework. -
ArkLib/Data/CompPoly/Fold.lean: This new file introduces native computable
splitNthandfoldNthoperations forCPolynomialto support FRI protocols without routing through Mathlib polynomials. It includes theorems relating these definitions to standard polynomial operations and degree bounds, thoughsplitNth_toPoly,foldNth_toPoly, andfoldNth_natDegree_le_of_lecurrently containsorryplaceholders. -
ArkLib/Interaction/BCS/HybridDecoration.lean: This file introduces
HybridDecoration, a structure that assigns optionalOracleInterfacemetadata to sender nodes within a protocol transcript. It provides the core definitions for managing oracle queries along transcript paths—includingQueryHandle,toOracleSpec, andanswerQuery—allowing for the selective commitment of oracle messages in the BCS transform without anysorryplaceholders. -
ArkLib/Interaction/BCS/HybridReduction.lean: This file introduces the
HybridOracleReductionstructure and thetoMonadDecorationfunction to support protocols where only select sender nodes carry oracle interfaces. These definitions generalize standard oracle reductions to facilitate the BCS transformation, and the file contains nosorryoradmitplaceholders. -
ArkLib/Interaction/BCS/HybridSpec.lean: This file introduces the
HybridSpecinductive type, which distinguishes between protocol messages that affect control flow and those that are structurally constant, facilitating selective (partial) BCS transformations. It provides definitions for transformed protocol specifications and transcripts, along with functions likewrapWithCommitmentsto convert prover strategies without using non-computable axioms orsorryplaceholders. -
ArkLib/Interaction/BCS/Verifier.lean: This file introduces the infrastructure for decomposing a BCS (Babai-Costello-Silvio) verifier into three components—challenger, query function, and decision function—to formalize the "public query" property within a hybrid oracle model. It defines key structures for query/response decorations and opening protocols, including the
PublicQueryVerifierandOpeningDecodefinitions. Several functions related to the Phase 2 opening protocol, such asopeningSpecandbcsPhase2Verifier, are currently implemented withsorryplaceholders. -
ArkLib/Interaction/Boundary/Compatibility.lean: This new file introduces formal definitions and structures to define soundness and completeness for interaction-native boundaries. It provides the
Statement.IsSoundandContext.IsCompletepredicates for plain boundaries, along with mechanisms to flatten oracle-aware boundaries into these plain representations. Nosorryoradmitplaceholders are used in these definitions. -
ArkLib/Interaction/Boundary/Core.lean: This file introduces the core framework for "interaction boundaries," providing definitions like
Statement,Witness, andContextto reinterpret protocol interfaces without altering their underlying transcript or round structure. It includespullbackfunctions that adapt verifiers, provers, and reductions to these new interfaces through input projection and output lifting. Nosorryoradmitplaceholders are introduced. -
ArkLib/Interaction/Boundary/Oracle.lean: This new file implements the oracle access layer for interaction-native boundaries, introducing the core definitions and theorems needed to translate "inner" oracle queries into "outer" oracle computations. It provides the
pullbackCounterpartandpullbackSimulatemechanisms for rewiring protocol trees and verifier simulations, along with proofs that these transformations preserve operational behavior. The file contains nosorryoradmitplaceholders. -
ArkLib/Interaction/Boundary/OracleSecurity.lean: This file defines the infrastructure for transporting oracle-based security properties across interaction boundaries, focusing on verifier simulation and honest execution views. It introduces several new definitions and theorems, most notably
simulates_pullback, which proves that boundary pullbacks preserve the correspondence between concrete oracle materialization and simulated oracle behavior for both verifiers and reductions. Nosorryoradmitplaceholders are included. -
ArkLib/Interaction/Boundary/Reification.lean: This file introduces the reification layer for interaction-native boundaries, defining structures for concrete oracle materialization (
OracleStatementReification) and a coherence predicate (Realizes) to ensure agreement with the simulation-based access layer. It provides bundledOracleStatementandOracleContextdefinitions, proves several theorems regarding the consistency between simulation and materialized oracle data, and implements apullbackoperation for reinterpreting oracle reductions across boundaries. Nosorryoradmitplaceholders are present in the code. -
ArkLib/Interaction/Boundary/Security.lean: This new file establishes theorems and definitions for transporting security properties, specifically soundness and completeness, of verifiers and reductions across interaction-native boundaries via pullback operations. It provides formal proofs that security guarantees are preserved when lifting components from an inner protocol to an outer one, with no
sorryplaceholders in the implementation. -
ArkLib/Interaction/FiatShamir/Basic.lean: This file introduces the foundational definitions for the Fiat-Shamir transform, defining
ReplayOracleas a deterministic counterpart andMessagesOnlyas the data type for non-interactive proofs. It includes thederiveTranscriptfunction to reconstruct interactive transcripts from messages-only proofs and contains nosorryplaceholders. -
ArkLib/Interaction/FiatShamir/DuplexSponge.lean: This file introduces a concrete duplex sponge instantiation of the Fiat-Shamir transform, defining the
SpongeAnnotationstructure for node-specific serialization and thebuildSpongeReplayOraclefunction to generate deterministic challenges. It provides high-level definitions, such asPublicCoinReduction.duplexSpongeFiatShamir, to convert interactive public-coin protocols into non-interactive ones without the use ofsorryoradmitplaceholders. -
ArkLib/Interaction/FiatShamir/Transform.lean: This file implements the Fiat-Shamir transform for public-coin interactive protocols by replacing random verifiers with deterministic replay oracles. It introduces definitions for transforming interactive provers, verifiers, and reductions into their non-interactive counterparts, allowing for the generation and verification of "messages-only" proofs. No
sorryoradmitplaceholders are included. -
ArkLib/Interaction/Oracle/BCS.lean: This file introduces the BCS (Ben-Sasson–Chiesa–Spooner) transform for
Oracle.Spec, which converts interactive oracle protocols into non-interactive arguments by committing to oracle messages. It provides a comprehensive set of definitions for transformed specifications, commitment decorations, and shared transcripts, alongside utilities for wrapping prover strategies and decomposing verifiers into public-query phases. Nosorryoradmitplaceholders are included in the implementation. -
ArkLib/Interaction/Oracle/Bridge.lean: This file introduces new definitions to bridge legacy W-type-based interaction specifications and decorations into the new
Interaction.Oracle.Specinductive format. It provides structural conversions for specifications, roles, and oracle interfaces, using a default value function to resolve message representatives at sender nodes. -
ArkLib/Interaction/Oracle/Chain.lean: This file introduces the
Oracle.Spec.Chaintype, a recursive telescope used to represent N-round oracle protocols by bundling specifications, decorations, and transcript-dependent continuations. It provides definitions to flatten these chains into singleOracle.Specinstances and includes machinery to compose per-round prover and verifier steps into a completeOracle.Reduction. Nosorryoradmitplaceholders are introduced. -
ArkLib/Interaction/Oracle/Composition.lean: This file introduces infrastructure for composing
Oracle.Reductionobjects, including identity reductions, shared input reindexing, and sequential binary composition. It provides specialized utilities for composing provers and verifiers via structural recursion to ensure definitional computation of interaction specifications without the need for type casts. Nosorryoradmitplaceholders are present in the code. -
ArkLib/Interaction/Oracle/Continuation.lean: This file introduces new definitions and theorems for the sequential and multi-round composition of oracle reductions in interactive protocols. It defines an inductive
Chaintype to represent intrinsic round structures and acompoperator for binary composition, supported by theorems that establish the equivalence of composed simulators. The implementation contains nosorryoradmitplaceholders. -
ArkLib/Interaction/Oracle/Core.lean: This file establishes the core framework for path-dependent oracle access in interaction protocols by bridging generic specifications with the VCVio oracle computation model. It introduces several new definitions and theorems, including
OracleDecoration,OracleProver, andOracleReduction, to support round-by-round challengers and reductions with growing oracle access. The implementation is complete with nosorryoradmitplaceholders. -
ArkLib/Interaction/Oracle/Execution.lean: This file establishes the operational framework for executing oracle-decorated reductions, providing the machinery to simulate prover-verifier interactions with evolving oracle specifications. It introduces new definitions, theorems, and equivalence relations—such as
runWithOracleCounterpart,executeConcrete, andHonestExecutionEquivalent—to formalize the execution and composition of oracle-aware computations. Nosorryoradmitplaceholders are present in the implementation. -
ArkLib/Interaction/Oracle/Spec.lean: This file introduces the
Oracle.Specinductive type and its associated infrastructure to formally specify oracle-based interaction protocols, distinguishing between public messages and oracle-accessible sender messages. It provides new definitions for roles, decorations, and transcript projections, along with theorems for managing sequential composition and query routing. There are nosorryoradmitplaceholders in the file. -
ArkLib/Interaction/Oracle/StateChain.lean: This file introduces infrastructure for composing oracle interactions into state chains, providing a mechanism to thread prover/verifier state and accumulated oracle specifications across multiple protocol stages. It defines
stateChainVerifierandOracleReduction.stateChainCompto construct complex multi-stage oracle reductions from simpler individual steps. Nosorryoradmitplaceholders are present in the implementation. -
ArkLib/Interaction/OracleReification.lean: This file establishes a bridge between abstract oracle behaviors and concrete oracle statements, introducing the
Reificationstructure and derived security definitions such asreifiedSoundnessandreifiedCompleteness. It includes several new definitions and theorems, notably proving that reified knowledge soundness implies reified soundness and providing query-level simulation results for oracle composition. The proofs are complete and contain nosorryoradmitplaceholders. -
ArkLib/Interaction/Reduction.lean: This file introduces a new framework for interactive protocols by defining
Prover,Verifier, andReductiontypes based on W-type interaction trees (Spec). It provides support for public-coin protocols, sequential composition of reductions, and execution over stateful or stateless chains, including a theorem characterizing the output of composed reductions. Nosorryoradmitplaceholders are used. -
ArkLib/Interaction/Security.lean: This file introduces formal security definitions for interactive reductions, including completeness, soundness, and knowledge soundness, alongside theorems for their composition. It provides a structural "claim tree" framework for round-by-round analysis, allowing protocol-level security bounds to be derived from local properties of sender and receiver nodes. No
sorryoradmitplaceholders are present in the code. -
ArkLib/OracleReduction/BCS/Basic.lean: This change deletes the file
ArkLib/OracleReduction/BCS/Basic.lean, which contained preliminary and incomplete definitions for the BCS transformation. The deleted code included a helper function for renaming protocol messages and several unfinished, commented-out stubs that utilizedsorryplaceholders. -
ArkLib/ProofSystem/Fri/Interaction/Core.lean: This new file establishes the core executable definitions and interaction specifications for an interaction-native implementation of the FRI protocol. It introduces structural definitions for domain indexing, protocol round specifications (using the
Interactionframework), and honest prover logic, while includingsorryplaceholders for two theorems regarding polynomial degree bounds after folding. -
ArkLib/ProofSystem/Fri/Interaction/FinalFold.lean: This file introduces the
finalFoldContinuationdefinition, which implements the terminal fold round of the FRI protocol within an interactive oracle reduction framework. It defines the prover and verifier logic for sampling a final challenge and computing the final degree-bounded polynomial and its associated statement. -
ArkLib/ProofSystem/Fri/Interaction/FoldPhase.lean: This file introduces the definitions and logic necessary to chain
$k$ non-final FRI folding rounds into a single interaction continuation. It defines the protocol's state transitions, transcript reconstruction, and the corefoldPhaseContinuationusing a modular oracle-reduction framework, without the use of anysorryplaceholders. -
ArkLib/ProofSystem/Fri/Interaction/FoldRound.lean: This file introduces the
foldRoundContinuationdefinition to model a single non-final FRI folding round as a modular oracle reduction. It implements the logic for the honest prover's polynomial folding, the verifier's challenge sampling, and oracle simulation for the resulting folded codewords without anysorryplaceholders. - ArkLib/ProofSystem/Fri/Interaction/General.lean: This new file serves as an umbrella module for the interaction-native FRI (Fast Reed-Solomon Interactive Oracle Proof of Proximity) protocol development. It provides documentation for the protocol's architectural components, such as folding rounds and query phases, while currently acting as an organizational entry point with no new theorems or definitions.
-
ArkLib/ProofSystem/Fri/Interaction/Protocol.lean: This file defines the full interaction-native FRI (Fast Reed-Solomon Interactive Oracle Proof of Proximity) protocol by composing the folding and query phases using
OracleReduction.comp. It introduces new definitions for the terminal phase and the complete protocol reduction logic, and it contains nosorryplaceholders. -
ArkLib/ProofSystem/Fri/Interaction/QueryRound.lean: This new file formalizes the FRI query phase by introducing definitions and logic for sampling query batches and performing consistency checks across FRI rounds. It provides both direct and oracle-based functions to verify that sampled base-domain indices remain consistent with folded codewords and the terminal polynomial. No
sorryoradmitplaceholders are used in the implementation. -
ArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean: This file introduces computable, cast-free operations for
CMvPolynomialandCPolynomialtailored for the Sum-check protocol, including partial evaluation, domain summation, and a bridge to univariate polynomials. It establishes theResidualPolystructure for tracking prover state, though most correctness and degree-preservation proofs are currently marked withsorryplaceholders. -
ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean: This file introduces the core definitions for an interaction-native sum-check protocol, including interaction specifications (
roundSpec,fullSpec), state transition logic (advance), and per-round verification functions (roundCheck). It defines the algebraic structure for representing polynomials and sum-claims across multi-round interactions using theVCVioframework. Nosorryoradmitplaceholders are present. -
ArkLib/ProofSystem/Sumcheck/Interaction/General.lean: This new file implements the general
$n$ -round oracle-native sum-check protocol by recursively composing single-round interactions within theVCVioframework. It introduces definitions for both stateless and stateful prover strategies—sumcheckReductionandsumcheckReductionStateful—alongside placeholder completeness and soundness theorems. While the file contains nosorryoradmitplaceholders, the security proofs are currently trivial and intended for future implementation. -
ArkLib/ProofSystem/Sumcheck/Interaction/Oracle.lean: This file introduces new definitions for an oracle-native sum-check protocol, specifically providing
roundOracleDecorationandoracleVerifierStepto handle single-round verifier logic and polynomial oracle queries. These components support a continuation-based refactor where the prover's univariate messages are treated as queryable oracles. Nosorryoradmitplaceholders are included. -
ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean: This file formalizes a single round of the sum-check protocol as an oracle reduction, providing definitions for computing residual polynomials, univariate round polynomials, and honest prover steps. It introduces both stateless and stateful implementations of the round continuation and provides theorems proving their public and execution equivalence in honest settings. No
sorryoradmitplaceholders are included in the code. - CONTRIBUTING.md: This update expands the style guide to emphasize code readability through the use of standard Lean notation, existing library combinators, and term-style definitions over tactics. Additionally, it establishes stricter quality standards for docstrings, requiring they focus on mathematical descriptions while prohibiting historical commentary or references to renamed or removed definitions.
-
INTERACTION_BOUNDARIES.md: This document provides the design specification for the
ArkLib.Interaction.Boundaryframework, which enables protocol interface adaptation (statement, witness, and oracle reinterpretation) while preserving the underlying transcript and round structure. It establishes a three-layer architecture—Core, Access, and Reification—to formalize how verifier simulations and prover materializations are "pulled back" across boundaries, explicitly decoupling these interface mappings from sequential protocol composition. -
INTERACTION_BRACHA_VERIFICATION.md: This document identifies Bracha Reliable Broadcast (RBC) as a primary benchmark for the
Interactionlibrary, noting its suitability for testing the framework’s concurrency, multiparty, and liveness features. It maps the landscape of existing protocol formalizations, such as Bythos and Veil, to positionInteractionas an interaction-centric alternative that prioritizes Lean-native verification over external SMT solvers. -
INTERACTION_CONCURRENT_SPEC.md: This design reference outlines a concurrent extension for the
ArkLib.Interactionlibrary, proposing a minimal continuation-based kernel centered on binary structural parallelism. It establishes a frontier-residual operational semantics to support adversarial scheduling and provides a comprehensive roadmap for integrating diverse concurrency mental models, such as state machines and partial-order semantics. -
INTERACTION_PROTOCOL_ROADMAP.md: This new documentation file outlines a strategic roadmap for evolving the
Interactionmodule into a generalized semantic framework for modeling and verifying concurrent protocols. It details a six-phase development plan covering core concurrency foundations, choreography frontends, knowledge-based security, and causal models. The proposed architecture prioritizes first-class support for partial observability, scheduler control, and causal equivalence across diverse protocol families. - blueprint/src/coding_theory/defs.tex: This update refines the mapping between blueprint definitions and the Lean formalization by providing more precise, namespaced paths for interleaved codes and proximity measures. It also improves the formatting of references for generator matrices.
- blueprint/src/content.tex: This update introduces the "Interaction Framework" chapter to the project blueprint, establishing the foundational structure for modeling multi-party protocols and oracles. It integrates several new modules covering key concepts such as composition, security definitions, the Fiat-Shamir transform, and the BCS construction.
-
blueprint/src/interaction/bcs.tex: This file formalizes the Ben-Sasson–Chiesa–Spooner (BCS) transformation for hybrid oracle reductions, extending the standard protocol from simple oracle proofs to reductions that output queryable oracles for modular composition. It introduces
HybridSpecto distinguish between plain and committed messages and establishes a "query completeness" condition to ensure that output simulations remain functional using Phase 2 opening data. -
blueprint/src/interaction/boundary.tex: This file introduces the concept of protocol "Boundaries," providing a dependent-type-native framework for reinterpreting statement, witness, and oracle interfaces without altering transcript structures. It defines a layered architecture for query simulation and concrete data reification, establishing the necessary pullback operations and coherence predicates (such as
Realizes) to transport soundness and completeness properties across protocol layers. -
blueprint/src/interaction/composition.tex: This file documents the formalization of sequential composition and iteration mechanisms for interaction specifications and strategies. It introduces the
liftAppendcombinator to manage dependent types without explicit casts and defines various iteration patterns, including state-indexed chains and continuation-based telescopes. -
blueprint/src/interaction/fiat_shamir.tex: This document specifies a Fiat-Shamir transform for dependent interaction trees, where the protocol's future shape can depend on earlier verifier challenges. It introduces a
PublicCoinCounterpartstructure to enable verifier-side transcript replay and defines a method for reconstructing full transcripts from sender-only message sequences using a deterministic replay oracle. -
blueprint/src/interaction/foundations.tex: This file introduces the foundational theory for modeling interactive protocols as dependently-typed trees (
Spec), allowing for protocols where message spaces and round counts depend on previous moves. It defines core abstractions includingTranscript, metadataDecoration, and monadicStrategy, prioritizing structural recursion over index-based arithmetic to simplify protocol composition and reasoning. -
blueprint/src/interaction/oracle.tex: This file adds a new section to the blueprint defining the formal framework for path-dependent oracle access in interactive oracle proofs. It introduces definitions for
OracleDecorationandQueryHandleto model queryable transcript messages and provides a bridge to the genericCounterpart.withMonadsframework to enable compositionalOracleReductionandOracleVerifierstructures. - blueprint/src/interaction/security.tex: This file defines the formal security framework for interactions, including completeness, soundness, and knowledge soundness for both standard and oracle-based reductions. It introduces "claim trees" for round-by-round security analysis and provides composition theorems for maintaining these properties across protocol phases.
-
blueprint/src/interaction/two_party.tex: This file adds the formal specification for two-party and multi-party interactions by decorating existing interaction trees with sender and receiver roles. It defines the duality between choosing moves (
$\Sigma$ -types) and responding to them ($\Pi$ -types) to formalize strategies, counterparts, and role-aware refinements for oracle-based verification. - blueprint/src/macros/common.tex: This update introduces a set of LaTeX macros to support the formal documentation of a Spec-based interaction framework built on W-types. The new commands cover core concepts such as strategies, roles, decorations, and oracles.
-
blueprint/src/oracle_reductions/defs.tex: This update reformats the Lean declaration tags in the blueprint to use individual
\lean{}commands for each term instead of comma-separated lists. This change likely improves the granularity of the mapping between the formal LaTeX definitions and their corresponding Lean 4 implementations. -
blueprint/src/polynomials/defs.tex: This update removes the explicit Lean implementation tags
UniPolyandMlPolyfrom the blueprint definitions for computable univariate and multilinear polynomials. This effectively decouples these high-level definitions from their specific Lean identifiers in the documentation. -
blueprint/src/proof_systems/binius.tex: The changes remove
\leancommand references that linked mathematical definitions and theorems for binary tower fields to specific Lean identifiers. This decouples the high-level documentation in the blueprint from the underlying formal implementation names. -
blueprint/src/proof_systems/simple_protocols.tex: The changes refine the mapping between the blueprint and the Lean implementation by splitting combined
\leantags into individual commands for theDoNothingreduction. Additionally, the reference toCheckClaim.oracleReduction_completenesswas removed, likely to reflect changes in the underlying formalization. -
blueprint/src/proof_systems/stir.tex: This update refines the LaTeX blueprint by splitting grouped Lean declaration links into individual
\leancommands. This change ensures each formal theorem and definition is explicitly and separately mapped to its corresponding mathematical lemma. -
blueprint/src/proof_systems/whir.tex: This documentation update refines the Lean tags in the blueprint by splitting multi-item
\leancommands into separate entries. These changes improve the mapping between the LaTeX definitions and their corresponding Lean declarations for the WHIR proof system. - blueprint/src/references.bib: Adds bibliographic references covering foundational research in dependent type theory and ornaments, as well as contemporary cryptographic works on Fiat-Shamir transformations, SNARK architectures (Zinc, Jolt), and post-quantum security.
-
blueprint/src/vcv/defs.tex: This PR updates the Lean 4 cross-reference tags in the blueprint to accurately match the namespaces and naming conventions used in the formal library. These refinements ensure that definitions such as
OracleSpec,evalDist, and various simulation oracles are correctly linked to their corresponding Lean implementations. - docs/wiki/README.md: This update expands the wiki index with links to several new design references, roadmaps, and benchmarks concerning the "Interaction" protocol framework. These additions cover topics such as concurrent interaction, protocol verification benchmarks (e.g., Bracha reliable broadcast), and Universal Composability (UC) design sketches.
-
docs/wiki/repo-map.md: This update documents a major architectural shift from the legacy
OracleReductionframework to a newInteractionframework based on W-types, designating the latter as the repository's new conceptual center. It adds detailed mappings for the new BCS transformation modules and expands the concurrency section to cover structural concurrency, dynamic process semantics, and open-boundary primitives. -
scripts/README.md: This update corrects the documentation for
validate.shto reflect that the script now enforces a zero-warning policy (excludingsorryplaceholders) for theArkLib/Interaction/directory. This expands the existing linting requirements previously only noted forArkLib/Data/. -
scripts/check-docs-integrity.py: The script now uses
git ls-filesto identify markdown files within the documentation and script directories. This change ensures that integrity checks are performed only on files tracked by Git, preventing the processing of untracked or local-only files. -
scripts/validate.sh: This update extends the validation script to enforce a zero-warning policy (excluding
sorryplaceholders) for theArkLib/Interaction/directory. This ensures that any new code in this section of the library must be free of warnings before passing the CI check. -
ArkLib/Interaction/Oracle/Security.lean: This file introduces new security definitions for the
Oracle.Specframework, formalizing completeness, soundness, and knowledge soundness for oracle-based protocols. It defines core types for oracle behavior and relations—such asInputImpl,OutputRealizes, andInputRelation—and includes a theorem stating that knowledge soundness implies soundness which currently contains asorryplaceholder. -
PORTING.md: This document tracks the "Core Rebuild" project, documenting the migration from a flat protocol model to a more flexible architecture based on W-type interaction trees (
Spec) and role-based decorations. It serves as a comprehensive progress report and architectural specification for the library's new modular interaction, oracle, and security layers. -
ArkLib/Interaction/OracleSecurity.lean: This Lean file introduces formal definitions for security notions in oracle-based interaction protocols, specifically completeness, soundness, and knowledge soundness. It utilizes a "behavior-first" design where security properties are defined relative to oracle implementations and transcripts rather than concrete materialization. The file includes new definitions for straightline extractors and input/output relations, one new theorem, and contains no
sorryplaceholders.
Last updated: 2026-04-14 14:04 UTC.
Build Timing Report
Incremental Rebuild Signal
This compares a clean project build against an incremental rebuild in the same CI job; it is a lightweight variability signal, not a full cross-run benchmark. Slowest Current Clean-Build FilesShowing 20 slowest current targets, with comparison against the selected baseline when available.
|
Add "Authors: Quang Dao" to all Interaction files missing it. Rewrite Spec, Transcript, and ofList docstrings for clarity. Made-with: Cursor
Simplify Prover/Verifier/Reduction types: WitnessIn is plain, VerOutput deleted (verifier returns StatementOut), WitnessOut independent of StatementOut. Add Security.lean with completeness, soundness, knowledge soundness, ClaimTree, KnowledgeClaimTree, and round-by-round definitions. Update Oracle.lean, TwoParty Strategy/Compose, and Multiparty accordingly. Made-with: Cursor
autoImplicit = false is already set globally in lakefile.toml. Remove the duplicate set_option from all Interaction files and document this in AGENTS.md. Made-with: Cursor
…tors, overhaul docstrings Rename `Transcript.appendFamily` -> `liftAppend`, `Transcript.join` -> `append` (freeing `join` for n-ary flattening), and propagate across all files. Reorder Append.lean so `liftAppend` precedes `append`/`split` and `comp` precedes `compFlat`. Add new n-ary chain combinators in Chain.lean: `Transcript.chain` (telescope type), `Transcript.join`/`unjoin` (flatten/unflatten isomorphism with round-trip simp lemmas), `Transcript.liftJoin` (lift telescope-indexed families to chain transcripts). Rename `Spec.chainFamily` -> `Transcript.chainFamily`. Rewrite all docstrings in Append.lean, Chain.lean, and Compose.lean to be intrinsic and intuitive. Add docstring quality rule to CONTRIBUTING.md and AGENTS.md. Made-with: Cursor
…hain Move the continuation-style intrinsic chain (formerly `Spec.Unfolding` in `ChainIntrinsic.lean`) into `Basic/Chain.lean` as the canonical `Spec.Chain` API. Extract the old stage-indexed `Spec.chain` into a new `Basic/StateChain.lean` under the explicit `stateChain` prefix. Chain.lean now provides: - `Spec.Chain` (depth-indexed telescope: round spec + continuation) - `Chain.toSpec` (convert to concrete `Spec` via `Spec.append`) - `Chain.replicate`, `Chain.ofStateMachine` (derived constructors) - `Chain.splitTranscript` / `Chain.appendTranscript` (telescope ops) - `Chain.strategyComp` / `Chain.strategyCompUniform` (composition) StateChain.lean preserves the full legacy API under `stateChain*` names. Made-with: Cursor
…eChain Merge the intrinsic reduction layer (formerly `ReductionIntrinsic.lean`) into `Reduction.lean` as the default `Reduction.ofChain` surface. Rename all stage-threaded chain identifiers to `stateChain*` across TwoParty, Reduction, and Oracle modules. Reduction.lean gains: - `Decoration.ofChain` / `Chain.roles` (role decoration from Chain) - `Strategy.ofChain` / `Counterpart.ofChain` (recursive composition) - `Reduction.ofChain` (stateless chain-based reduction composition) Renames in TwoParty: - `RoleDecoration.chain` → `RoleDecoration.stateChain` - `Counterpart.chainComp*` → `Counterpart.stateChainComp*` - `Strategy.chainCompWithRoles*` → `Strategy.stateChainCompWithRoles*` Renames in Oracle: - `OracleReduction.chainComp` → `OracleReduction.stateChainComp` - `toMonadDecoration_chain` → `toMonadDecoration_stateChain` Made-with: Cursor
Express the sumcheck protocol using the Interaction.Spec framework: - CompPoly.lean: CDegreeLE / CMvDegreeLE types, computable partial evaluation, domain summation, roundPoly, OracleInterface instances - Defs.lean: shared algebraic core (RoundClaim, summation domain, round spec with role decoration) - SingleRound.lean: one-round spec, honest prover step, verifier step - General.lean: n-round stateChain composition, full spec/roles, reduction via stateChainCompUniform - Oracle.lean: oracle decoration, verifier step stub (sorry) Made-with: Cursor
Regenerate the umbrella import file to include new StateChain and Sumcheck/Interaction modules. Update PORTING.md architecture section and phase descriptions to reflect the Chain/StateChain naming, the merged intrinsic reduction layer, and initial Sumcheck progress. Made-with: Cursor
… and theorems Replace every `show ... from by simpa using` cast pattern with named recursive transport functions `Transcript.packAppend` / `unpackAppend`. Rewrite `Reduction.comp` to use non-flat `Strategy.compWithRoles` + `Counterpart.append`, add bridge lemma `Counterpart.append_eq_appendFlat_mapOutput`, and reprove `completeness_comp` / `soundness_comp` against the new structure. Update PORTING.md with Phase 4d progress. Made-with: Cursor
Return the next statement alongside the next witness so composed reductions can enforce prover/verifier statement agreement in completeness and reuse the same transport across the oracle and sumcheck interaction layers. Made-with: Cursor
AI-authored by Codex (GPT-5) on behalf of Quang Dao.
Add a symmetric refinement layer over process systems with packaged controller, path, ticket, trace, and observation equivalence notions. Extend the concurrent examples with bisimulation-based preservation results and wire the new modules into the public Interaction surface.
Extend the concurrent design reference with a literature-grounded comparison matrix and borrowing guide, add the standalone Interaction protocol roadmap, and link both from the wiki index.
Add a design note on Bracha reliable broadcast as an Interaction benchmark, compare Bythos and Veil, survey verified distributed-protocol frameworks, and state the kernel-only proof-trust policy for future Interaction verification layers.
Rewrite the main concurrent Interaction docstrings to lead with semantic role and intended use rather than representation details. Also tighten the comparison and policy layers so readers from cryptography or distributed systems can orient quickly without already thinking in PL semantics.
Generalize the concurrent execution stack over ProcessOver and keep closed-world Process APIs as explicit specializations. - move execution, run, fairness, liveness, policy, and refinement machinery onto the generic ProcessOver core - remove leftover phantom Party parameters from the generic refinement and bisimulation layers - restore closed-world convenience lemmas and examples with explicit specializations so the public API stays clear Verification: - lake build ArkLib.Interaction.Concurrent.Examples - lake build ArkLib - python3 ./scripts/check-docs-integrity.py
Introduce the first structural open-world layer for concurrent interaction. - add Concurrent.Interface with Interface := PFunctor, packet and query aliases, and packet-level interface morphisms - add PortBoundary with empty, swap, tensor, and variance-correct boundary morphisms - update the concurrent module map docs and regenerate ArkLib.lean Verification: - lake build ArkLib.Interaction.Concurrent.Interface - python3 ./scripts/check-docs-integrity.py
Add the first algebraic law layer for the open-composition direction. - reuse native PFunctor coproducts for interface sums - add packet/query coproduct structure and boundary tensor/swap laws - add lawful map/par/plug classes for OpenTheory This keeps the open-world work operations-first while making the structural API precise enough for the first concrete model.
Add interface and boundary equivalence structure for the open-composition layer, together with canonical tensor/unit/symmetry coherence data. Also add equivalence-guided remapping in OpenTheory via mapEquiv and its first transport laws. This keeps map/par/wire/plug as the small OpenTheory kernel while moving boundary reshaping below it into Interface and PortBoundary.
Extend the open-composition layer with mapEquiv transport for par, wire, and plug, and add the interface/boundary bridge lemmas needed to connect boundary equivalences back to chart-level composition. This keeps the OpenTheory kernel small while making boundary reassociation and symmetry usable in theorem statements.
Finish the binary oracle composition theorem surface by proving the public fused simulator bridge and its concrete reified specialization. This closes the remaining append-boundary transport gap across: - oracle append transport helpers - continuation-level fused simulation - reified concrete query simulation
Made-with: Cursor
…pen expressions Made-with: Cursor
Made-with: Cursor # Conflicts: # ArkLib/ProofSystem/Fri/RoundConsistency.lean
Move 50 files (Basic/*, TwoParty/*, Concurrent/*, Multiparty/*) from ArkLib/Interaction/ to VCVio/Interaction/. These are pure interaction theory modules with no reduction/oracle-specific dependencies. Kept files (Reduction, Security, Oracle/*, Boundary/*, FiatShamir/*) now import from VCVio.Interaction instead of ArkLib.Interaction. VCVio dependency updated to quang/interaction-migration branch. Made-with: Cursor
Implement the duplex sponge instantiation of the Fiat-Shamir transform for the interaction-native formalization. The basic FS transform is parametric in the ReplayOracle; this constructs a specific ReplayOracle from a duplex sponge with a concrete permutation. New definitions: - SpongeAnnotation: per-node serialization metadata (serialize at sender nodes, squeeze length + deserialize at receiver nodes) - buildSpongeReplayOracle: thread a CanonicalDuplexSponge through the Spec tree to produce a ReplayOracle - spongeReplayOracle / toFSStatement: statement initialization wrappers - Prover/PublicCoinVerifier/PublicCoinReduction.duplexSpongeFiatShamir: the full transform, composing with the existing basic FS machinery Made-with: Cursor
Made-with: Cursor
c5d277e to
5861161
Compare
Commitment scheme cutover to new Interaction.Opening interface, streamline oracle decoration and security theorem infrastructure, and update boundary modules for compatibility. Made-with: Cursor
Introduce HybridSpec (branching + pass-through nodes), partial BCS via CommitDeco, HybridDecoration for mixed plain/oracle senders, PublicQueryVerifier decomposition, and Phase 1/2 infrastructure. Delete the old OracleReduction/BCS/Basic.lean skeleton. Made-with: Cursor
Add blueprint formulation for BCS transformation on hybrid oracle reductions, CDHZ reference, and update wiki with new BCS modules. Made-with: Cursor
Introduce Oracle.Spec, a new inductive type (.done, .public, .oracle) that structurally distinguishes public and oracle messages, giving definitional independence of downstream types from oracle message values. New files: - Spec.lean: core inductive, RoleDeco, OracleDeco, PublicTranscript, QueryHandle, toOracleSpec, restrictLeft/restrictRight - Composition.lean: Reduction.id, comp, freezeSharedToPUnit, pullbackShared - Bridge.lean: conversion from old Interaction.Spec + OracleDecoration - BCS.lean: BCS transform directly on Oracle.Spec (CommitDeco, SharedTranscript, bcsSpec, wrapWithCommitments, PublicQueryVerifier) Modified files: - Core.lean: Oracle.Prover, Oracle.Verifier, Oracle.Reduction structures - Execution.lean: Spec.runWithOracleCounterpart, Reduction.executeConcrete - ArkLib.lean: imports for new modules Made-with: Cursor
- Remove accSpec parameter from Oracle.Verifier.toFun, hardcode to []ₒ - Add liftCounterpartAcc helper to lift counterpart accumulated oracle specs in composition (no sorry) - Rewrite completeness with OutputRealizes conjunct - Rewrite knowledgeSoundness: adversarial prover outputs oStmtOut, extractor sees concrete oracle data - Add oStmtOut parameter to Extractor.Straightline - Remove duplicate Verifier.InputRelation/OutputRelation/Accepts - Inline Accepts into soundness definition - Update blueprint security section to match new definitions Made-with: Cursor
…s hypothesis - Add answerCommittedQueries: compute committed oracle responses from a full transcript (deterministic, pure) - Add bcsPhase2: evaluate PublicQueryVerifier.decide with pre-computed query data - Strengthen hLangOut in knowledgeSoundness_implies_soundness to include OutputRealizes conjunct (required for the proof to go through) - Add detailed proof strategy comment for KS→soundness Made-with: Cursor
- Add OpeningDeco structure to Oracle/BCS.lean: generic opening proof data for committed oracle nodes, parameterized by OpeningProof type - Update PORTING.md with comprehensive Oracle.Spec layer status: file inventory, design decisions, updated TODO list - Update KS→soundness open question to reflect new formulation Made-with: Cursor
- Add N-ary chain composition (Oracle/Chain.lean) with Spec.Chain, Chain.Prover.comp, Chain.Verifier.comp, and Reduction.ofChain - Prove Spec.runWithOracleCounterpart_mapOutputWithRoles in Execution.lean - Prove knowledgeSoundness_implies_soundness in Security.lean (no sorry) - Rename for maximal namespacing: Prover.compAux, Verifier.compAux, Verifier.retargetMonads, Counterpart.liftAcc Made-with: Cursor
The acceptOStmt/acceptWitness approach is circular: it asks the caller to supply concrete oracle realizations, which is the "knowledge" that KS should extract. Revert to sorry with honest existential statement and document the difficulty. Delete the legacy version in OracleSecurity.lean which had the same flaw. Made-with: Cursor
Summary
This PR introduces the
Interactionframework: a complete, sorry-free formalization of interactive protocol semantics in Lean 4, replacing the old flatProtocolSpecmodel with a dependent-type-native design where later protocol rounds can depend on earlier moves.The framework is organized in clean, acyclic layers, from sequential two-party protocols up to concurrent open-system composition. It also includes interaction-native frontends for Sumcheck and FRI, plus supporting computable polynomial infrastructure.
Scale: 126 commits, 211 files changed, ~41K lines added across 66 Interaction modules, 12 proof-system modules, 2 CompPoly modules, 7 blueprint chapters, 5 design documents, and CI/tooling updates.
What's in this PR
1. Core sequential interaction (
Interaction/Basic/)Spec: W-type interaction trees with dependent branching (move types at later rounds depend on earlier moves)Transcript: complete plays through aSpecDecoration: per-node metadata with functorial mappingNode: realized node contexts, schemas, and telescope-style descriptionsSyntax/Shape/Interaction: generic local participant syntax, functorial refinements, and local execution lawsStrategy: one-player strategies with monadic effectsAppend/Replicate/Chain/StateChain: sequential composition, iteration, continuation-style telescopes, and stage-indexed state chainsBundledMonad/MonadDecoration: per-node monadic effectsOwnership: owner-based interaction model for buildingSyntaxOverobjects2. Two-party protocols (
Interaction/TwoParty/)Role: sender/receiver roles withAction/Dual/interactDecoration:RoleDecorationplusRoleMonadContext/RolePairedMonadContextStrategy:Strategy.withRoles,Counterpart,PublicCoinCounterpartwith transcript replay,runWithRolesexecution,runWithRolesAndMonadsfor per-node monadsCompose: append, replicate, stateChain composition for strategies and counterpartsRefine:Role.Refinefor role-aware data refinement (sender-specific data, no receiver padding)Swap: involutive role swap with composition lemmasExamples: concreterflproofs showing computed strategy types3. Multiparty local views (
Interaction/Multiparty/)Core:LocalViewinductive (active / observe / hidden / quotient) for partial observability,localSyntax, multipartyStrategyviaSyntaxOver.comapProfile: per-partyViewProfilefor heterogeneous observation across partiesBroadcast: public-transcript specialization (one acts, all observe)Directed: point-to-point sender/receiver edge decorationsExamples: three-party knowledge-soundness, adversarial delivery, adaptive corruption scenariosMultiparty.lean(root): N-party asSpec+PartyDecoration, with MPST-style projection to roles viatoRoles4. Concurrent semantics (
Interaction/Concurrent/)Structural layer:
Spec: structural concurrent syntax via binaryparFrontier/Trace: enabled events and scheduler linearizationsIndependence/Interleaving: true-concurrency diamond lemma and trace equivalenceDynamic process layer:
Process:StepOver/ProcessOver(context-parametric) and closed-worldStep/Processspecializations withNodeSemantics(controllers +LocalView)Machine: state-indexed transition system frontendTree: structural-tree frontend bridging toProcessControl/Profile/Current: scheduler ownership, per-party profiles, and current local viewsVerification layer:
Execution/Run: finite prefixes and infinite runs with metadata extractionObservation: transcript matching relations (by controller, event, ticket, observation)Refinement: forward simulation with behavior preservationBisimulation/Equivalence: symmetric refinement and packaged equivalence notionsPolicy: executable step policies with trace complianceFairness: weak/strong fairness via stable ticketsLiveness: temporal predicates, system-level safety/liveness under fairnessOpen composition layer:
Interface:Interface := PFunctor,Packet,Hom(chart),QueryHom(lens),Equiv,sumwith composition lawsOpenTheory: boundary-indexed algebra of open systems (map/par/wire/plug) withIsLawfultypeclasses (functoriality, naturality)OpenSyntax: tagless-final free lawful model (Expr), provingOpenTheorycoherenceExamples: in-flight delivery, looping processes, ticket bisimulation, observation simulation5. Reductions and security (
Interaction/Reduction.lean,Security.lean)Prover/Verifier/Reduction: interactive protocol participants overSpec+RoleDecorationPublicCoinVerifier: public-coin specializationReduction.comp/stateChainComp/ofChain: sequential and chain-based compositionClaimTree/KnowledgeClaimTree: per-round security decomposition6. Oracle layer (
Interaction/Oracle/)Core:OracleDecorationattaching path-dependent oracle interfaces to interaction nodes,OracleCounterpart,OracleProver,OracleReduction, query routingExecution:runWithOracleCounterpart, accumulated oracle specs, honest public/execution equivalenceContinuation: sequential and multi-round oracle reduction composition (Chain,comp)StateChain: oracle-aware state-chain verifier and reduction composition7. Oracle security and reification (
OracleSecurity.lean,OracleReification.lean)Reificationbridge between abstract behaviors and concrete oracle statements8. Boundaries (
Interaction/Boundary/)Core:Statement/Witness/Contextfor same-transcript interface adaptationOracle:OracleStatementAccess,pullbackCounterpartfor oracle boundary transportReification:OracleStatementReification,Realizescoherence predicateSecurity/OracleSecurity/Compatibility: transport of soundness, completeness, and simulation across boundaries9. Fiat-Shamir (
Interaction/FiatShamir/)Basic:ReplayOracle,MessagesOnly,deriveTranscriptTransform: full Fiat-Shamir transform for provers, verifiers, and reductions10. Proof system frontends
Sumcheck (
ProofSystem/Sumcheck/Interaction/):RoundClaim, domain summation, round specs with role decorationsstateChainComp(security proofs are scaffolding)CompPoly.lean)FRI (
ProofSystem/Fri/Interaction/):OracleReduction.compCompPoly (
Data/CompPoly/):CDegreeLE/CMvDegreeLEdegree-bounded types withOracleInterfaceinstancessplitNth/foldNthfor computable polynomial splitting/folding11. Documentation and infrastructure
Design documents:
PORTING.md: core rebuild progress trackerINTERACTION_BOUNDARIES.md: boundary framework specificationINTERACTION_CONCURRENT_SPEC.md: concurrent extension design referenceINTERACTION_PROTOCOL_ROADMAP.md: literature-grounded protocol roadmapINTERACTION_BRACHA_VERIFICATION.md: Bracha RBC as benchmark targetBlueprint: New "Interaction Framework" chapter with 7 sections (foundations, composition, two-party, Fiat-Shamir, oracle, security, boundary)
Tooling:
scripts/check-warning-log.py: new CI warning budget enforcementscripts/validate.sh: updated to run warning checks onInteraction/andData/subtrees (excluding sorry warnings)fe33688, VCVio to2fec633Wiki:
docs/wiki/repo-map.mdupdated with Interaction module mapSorry status
ArkLib/Interaction/(66 files): 0 sorries (the entire abstract framework is sorry-free)Data/CompPoly/Fold.lean: 3 sorries (bridge lemmas to MathlibtoPoly)ProofSystem/Fri/Interaction/Core.lean: 2 sorries (honest fold degree bounds)ProofSystem/Sumcheck/Interaction/CompPoly.lean: 14 sorries (evaluation, degree, and ring hom lemmas)ProofSystem/Fri/RoundConsistency.lean: 1 sorry (Lagrange completeness)General.leansecurity proofs usetrivialas explicit placeholdersTest plan
lake build ArkLibsucceeds./scripts/validate.shpasses (warning budget, import check, docs integrity)Interaction/orData/subtreesGeneral (1).lean,SingleRound (1).lean)Posted by Cursor assistant (model: claude-4.6-opus-high-thinking) on behalf of the user (Quang Dao) with approval.